﻿using System.Reflection;
using TrackSystem.UI.Server.HttpRepository.Channel;
using TrackSystem.UI.Server.HttpRepository.Equip;
using TrackSystem.UI.Server.HttpRepository.Logic;
using TrackSystem.UI.Server.HttpRepository.Sensor;
using TrackSystem.UI.Server.HttpRepository.Var;

namespace TrackSystem.UI.Server.Features
{
    public static class ServicesExtensions
    {
        public static IServiceCollection AddRepositoryServices(this IServiceCollection services)
        {
            services.AddScoped<IEquiplHttpRepository, EquipHttpRepository>();
            services.AddScoped<IChannelHttpRepository, ChannelHttpRepository>();
            services.AddScoped<ISensorHttpRepository, SensorHttpRepository>();
            services.AddScoped<IVarHttpRepository, VarHttpRepository>();
            services.AddScoped<ILogicHttpRepository, LogicHttpRepository>();
            services.AddAutoMapper(Assembly.GetExecutingAssembly());

            return services;
        }
    }
}
